//
//  SettingTableViewCell.m
//  nmrsc
//
//  Created by xumckay on 16/1/20.
//  Copyright © 2016年 bric. All rights reserved.
//

#import "SettingTableViewCell.h"

@implementation SettingTableViewCell


-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        _titleLabel=[[UILabel alloc]initWithFrame:CGRectMake(15,0,kDeviceWidth/2,45)];
        _titleLabel.font=[UIFont systemFontOfSize:15];
        _titleLabel.textAlignment=NSTextAlignmentLeft;
        _titleLabel.textColor=COLOR(120, 120, 120, 1);
        [self.contentView addSubview:_titleLabel];
        
        _autoUpdateSwitch=[[UISwitch alloc]initWithFrame:CGRectMake(kDeviceWidth-20-45,8, 45, 25)];
        _autoUpdateSwitch.onTintColor=COLOR(36, 148, 88, 1);
        [self.contentView addSubview:_autoUpdateSwitch];
        
        _arrowView=[[UIImageView alloc]initWithFrame:CGRectMake(kDeviceWidth-25,22.5-7.5,8.5,15)];
        [_arrowView setImage:[UIImage imageNamed:@"right-2"]];
        [self.contentView addSubview:_arrowView];
        
        UIView *sep=[[UIView alloc]initWithFrame:CGRectMake(0,44.5,kDeviceWidth,0.5)];
        sep.backgroundColor=COLOR(200, 200, 200, 1);
        [self.contentView addSubview:sep];

        _detailLabel=[[UILabel alloc]initWithFrame:CGRectMake(kDeviceWidth-100-15-20,0,100,45)];
        _detailLabel.textAlignment=NSTextAlignmentRight;
        _detailLabel.font=[UIFont systemFontOfSize:15];
        _detailLabel.text=@"15M";
        _detailLabel.textColor=COLOR(120, 120, 120, 1);
        [self.contentView addSubview:_detailLabel];
        
    }
    return self;
}



- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
